<template>
       <el-radio-group v-model="radio1" size="mini" class="chenggroup soldercolor" >
                <el-radio-button class="chengradio yuandian green" label="绿色" ></el-radio-button>
                <el-radio-button class="chengradio yuandian blue" label="蓝色"></el-radio-button>
                <el-radio-button class="chengradio yuandian red" label="红色"></el-radio-button>
                <el-radio-button class="chengradio yuandian black" label="黑色"></el-radio-button>
                <el-radio-button class="chengradio yuandian white" label="白色"></el-radio-button>
                <el-radio-button class="chengradio yuandian yellow" label="黄色"></el-radio-button>
                <el-radio-button class="chengradio yuandian matteblack" label="亚光黑"></el-radio-button>
                <el-radio-button class="chengradio" label="不要阻焊"></el-radio-button>
        </el-radio-group>
</template>

<script>

export default {
     data() {
       return {
        i:this.$myF.arrIndex(this.$store.state.data.pcbInfo,"阻焊颜色：")
       };
     },
    computed:{
        radio1:{
                get: function () {
        return this.$store.state.data.pcbInfo[this.i].pcbpara;
      },
               set: function (v) {
        this.$store.state.data.pcbInfo[this.i].pcbpara = v;
      },

        }

    },
        watch:{
        radio1:function(val){
            let i=this.$myF.arrIndex(this.$store.state.data.pcbInfo,"文字颜色：")
              if(val=="白色"){
                 this.$store.state.data.pcbInfo[i].pcbpara="黑色"
             }
             else{
                 this.$store.state.data.pcbInfo[i].pcbpara=this.$store.state.data.textColor
             }
        }

    }
}
</script>

<style scoped>

@import "./css/radio.css";

.soldercolor >>> .chengradio{
 margin-right: 4px;
 
}

.soldercolor >>> .el-radio-button__inner{
  font-size: 12px;
  line-height: 1.4;
  
}

.yuandian  >>> .el-radio-button__inner{
  padding-left: 24px;
}

.yuandian>>> .el-radio-button__inner::before{
content: "";
position: absolute;
color: #009944;
width: 10px;
height: 10px;
border-radius: 100%;

margin-top:3px;
left:8px;

}

.soldercolor .green >>> .el-radio-button__inner::before{
background:#009944;
}

.soldercolor .blue >>> .el-radio-button__inner::before{
background:#0091fe;
}
.soldercolor .red >>> .el-radio-button__inner::before{
background:#ff0000;
}
.soldercolor .black >>> .el-radio-button__inner::before{
background:#000;
}
.soldercolor .white >>> .el-radio-button__inner::before{
background:#eee;
}
.soldercolor .yellow >>> .el-radio-button__inner::before{
background:#fff100;
}
.soldercolor .matteblack >>> .el-radio-button__inner::before{
background:#222222;
}




</style>